package com.ali.gts.controller;

import com.ali.gts.service.BuyGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TxController {
    @Autowired
    BuyGoodService buyGoodService;

    @RequestMapping("buyGoods-tx")
    @ResponseBody
    public String buyGoods(int gid,int num){
        buyGoodService.buyGoods(gid,num);
        return "success";
    }
}
